package Task;

public class Test {
    public static void main(String[] args) {
        ConstructionBank constructionBank = new ConstructionBank(8000, 8.236);
        BankOfDalian bankOfDalian = new BankOfDalian(8000, 8);

        double constructionBankInterest = constructionBank.computerInterest();
        double bankOfDalianInterest = bankOfDalian.computerInterest();

        System.out.printf("8000元存在建设银行8年零236天的利息为%.6f元\n", constructionBankInterest);
        System.out.printf("8000元存在大连银行8年零236天的利息为%.6f元\n", bankOfDalianInterest);
        System.out.printf("两个银行利息相差%.6f元\n", Math.abs(constructionBankInterest - bankOfDalianInterest));
    }

}
